<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<%@taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>  

<%
	response.setHeader ("Cache-Control", "no-cache");
	response.setHeader ("Pragma", "no-cache");
	response.setDateHeader ("Expires", 0); 
%>

<html>
  <head>
    <title><bean:message key="app.title"/></title>      
    <script type='text/javascript' src="./js/dhtmlxcommon.js"></script>    
    
    <link rel="stylesheet" type="text/css" href="./js/dhtmlxLayout/codebase/dhtmlxlayout.css">            
    <link rel="stylesheet" type="text/css" href="./js/dhtmlxLayout/codebase/skins/dhtmlxlayout_dhx_skyblue.css">   
    <script type='text/javascript' src="./js/dhtmlxLayout/codebase/dhtmlxlayout.js"></script>
    <script type='text/javascript' src="./js/dhtmlxLayout/codebase/dhtmlxcontainer.js"></script>    

    <link rel="stylesheet" type="text/css" href="./js/dhtmlxGrid/codebase/dhtmlxgrid.css">    
    <link rel="stylesheet" type="text/css" href="./js/dhtmlxGrid/codebase/dhtmlxgrid_skins.css">    
    <link rel="stylesheet" type="text/css" href="./js/dhtmlxGrid/codebase/skins/dhtmlxgrid_dhx_skyblue.css">
    <script type='text/javascript' src="./js/dhtmlxGrid/codebase/dhtmlxgrid.js"></script>    
    <script type='text/javascript' src="./js/dhtmlxGrid/codebase/dhtmlxgridcell.js"></script>    
    <script type='text/javascript' src="./js/dhtmlxGrid/codebase/excells/dhtmlxgrid_excell_sub_row.js"></script>
    <script type='text/javascript' src="./js/dhtmlxGrid/codebase/ext/dhtmlxgrid_fast.js"></script>
    
    <link rel="stylesheet" type="text/css" href="./js/dhtmlxTree/codebase/dhtmlxtree.css">
    <script type='text/javascript' src="./js/dhtmlxTree/codebase/dhtmlxtree.js"></script>               
    <script type='text/javascript' src="./js/dhtmlxTree/codebase/ext/dhtmlxtree_json.js"></script>    

    <link rel="stylesheet" type="text/css" href="./js/dhtmlxAccordion/codebase/skins/dhtmlxaccordion_dhx_skyblue.css">    
    <script type='text/javascript' src="./js/dhtmlxAccordion/codebase/dhtmlxaccordion.js"></script>    

    <link rel="stylesheet" type="text/css" href="./js/dhtmlxTabbar/codebase/dhtmlxtabbar.css">
    <script  type='text/javascript' src="./js/dhtmlxTabbar/codebase/dhtmlxtabbar.js"></script>

    <link rel="stylesheet" type="text/css" href="./js/dhtmlxToolbar/codebase/skins/dhtmlxtoolbar_dhx_skyblue.css">
    <script type='text/javascript' src="./js/dhtmlxToolbar/codebase/dhtmlxtoolbar.js"></script>    

    <link rel="stylesheet" type="text/css" href="./js/dhtmlxEditor/codebase/skins/dhtmlxeditor_dhx_skyblue.css">
    <link rel="stylesheet" type="text/css" href="./js/dhtmlxEditor/codebase/dhtmlxeditor.css">    
    <script type="text/javascript" src="./js/dhtmlxEditor/codebase/dhtmlxeditor.js"></script>

    <link rel="stylesheet" type="text/css" href="./js/dhtmlxForm/codebase/skins/dhtmlxform_dhx_skyblue.css">
    <script type="text/javascript" src="./js/dhtmlxForm/codebase/dhtmlxform.js"></script>
    
  </head>
  <body>
  <div style="position: relative; width: 100%; height: 10%;"><div id="toolbarObj"></div></div>  
  <script type="text/javascript">
     var toolbar = new dhtmlXToolbarObject("toolbarObj");
     
     <logic:notPresent name="loginForm" scope="session">    
       toolbar.addText("log", 0, '<bean:message key="state.usuario.notlogged"/>');
       toolbar.addSeparator("sep", 1 );
       toolbar.addText("reg", 2, '<html:link forward="registeruser"><bean:message key="action.register"/></html:link>');
     </logic:notPresent>
   
     <logic:present name="loginForm" scope="session">
       <logic:equal name="loginForm" scope="session" property="logged" value="true">    
          toolbar.addText("log", 0, '<bean:message key="salute.usuario"/>'+"<bean:write name="loginForm" property="nome"/>");            
          toolbar.addSeparator("sep1", 1 );
          toolbar.addText("time", 2, '<bean:write name="loginForm" property="ultimoLogin" format="HH:mm dd/MM/yyyy"/>');
          toolbar.addSeparator("sep2", 3 );
          toolbar.addInput("search", 4, "", 260);
          toolbar.addButton("btnpesq", 5, '<bean:message key="action.pesquisar"/>', "", "");          
          toolbar.addSeparator("sep3", 6 );
          toolbar.addText("edituser", 7, '<html:link forward="edituser"><bean:message key="action.edituser"/></html:link>');
          toolbar.addSeparator("sep4", 8 );          
          toolbar.addText("editsenha", 9, '<html:link forward="editsenha"><bean:message key="action.editsenha"/></html:link>');
          toolbar.addSeparator("sep5", 10 );
          toolbar.addText("logout", 11, '<html:link action="/logout"><bean:message key="action.logout"/></html:link>');
        </logic:equal> 
      </logic:present>     
  </script>

  
 
    

